Repository navigation
fix: heal interrupted indexes on sync and harden daemon lifecycle + WAL - #135
Merged
Merged
Conversation
Ports four golden-neutral robustness fixes from upstream colby v1.2.0..v1.4.1; all query/sync/daemon/pragma-side, no extraction-output change. - #1187: an index interrupted mid-resolution (crash, Ctrl-C, watchdog kill) no longer stays silently wrong until a full re-index. A resolution_incomplete marker in project_metadata is set when batched resolution begins and cleared on success; a bare `codegraph sync` (even with no file change) sweeps the parked unresolved refs through the batched resolver and clears the marker, and `codegraph status` reports the index as partial while the marker is set. The sweep re-resolves the already-persisted refs without re-extracting frameworks, so it stays byte-equal to `index --force` with no duplicate rows across repeated heal cycles, and it never deletes rows at rest — the incremental retry state (an unchanged file's ref resolving after a later edit adds the symbol) is preserved. - #1200: the daemon inactivity backstop now reaps only when no connected client pid is still alive, so a quiet-but-live editor session is no longer dropped to in-process mode. - #1185: the launch site plumbs the host pid through, and a startup-handshake timer (CODEGRAPH_STARTUP_HANDSHAKE_TIMEOUT_MS, 0 disables) shuts a detached daemon down if it never receives a request — reaping a server whose launcher was killed during startup, without touching cold-start direct serve. - #1231 (WAL half): bulk index disables SQLite autocheckpoint and folds the WAL back in a few large coalesced wal_checkpoint(TRUNCATE) passes gated on WAL size (CODEGRAPH_NO_WAL_DEFER opts out, CODEGRAPH_WAL_VALVE_MB tunes), cutting the checkpoint write-back thrash on slow storage. Index output is byte-identical; the parse-timeout worker-clock half is N/A for the in-process rayon build. Golden .schema and all fixtures unchanged (no regen).
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (93.03%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #135 +/- ##
==========================================
- Coverage 95.65% 95.63% -0.02%
==========================================
Files 115 115
Lines 55790 56095 +305
==========================================
+ Hits 53364 53649 +285
- Misses 2426 2446 +20
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upstream-sync Release A — ports four golden-neutral robustness fixes from colby v1.2.0..v1.4.1 (all query/sync/daemon/pragma-side, no extraction-output change).
codegraph syncinstead of staying silently wrong. Aresolution_incompletemarker inproject_metadatais set when batched resolution begins, cleared on success; a bare sync (even no-change) sweeps parked unresolved refs and clears the marker;codegraph statusreports partial while set. The sweep re-resolves already-persisted refs without re-extracting frameworks (byte-equal toindex --force, no duplicate rows across heal cycles) and never deletes rows at rest — the #1240 incremental retry state is preserved.CODEGRAPH_STARTUP_HANDSHAKE_TIMEOUT_MS, 0 disables) shuts a detached daemon down if it never gets a request; cold-start direct serve untouched.wal_checkpoint(TRUNCATE)valve gated on WAL size (CODEGRAPH_NO_WAL_DEFER,CODEGRAPH_WAL_VALVE_MB). Index output byte-identical. Parse-timeout worker-clock half is N/A for in-process rayon.Verification
make cigreen (fmt + clippy + test + guardrail + equivalence)..schema+ all fixtures byte-identical, NO regen (query/sync/daemon/pragma-only).unresolved_refsacross repeated cycles, and a #1240 retry-preservation guard.Upstream parity tracked separately in the local ledger; this is Release A of the chosen 1.2.0→1.4.1 PORT subset.